package com.itfitness.lockview;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;

import com.itfitness.lockview.widget.LockView;

public class MainActivity extends AppCompatActivity {
    private LockView lockview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        lockview = (LockView) findViewById(R.id.lockview);
        lockview.setPass(new int[]{0,3,6,4,2,5,8});
        lockview.addCheckPasswordCallBack(new LockView.CheckPasswordCallBack() {
            @Override
            public void onFailure() {
                Toast.makeText(MainActivity.this, "验证失败", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onSuccess() {
                Toast.makeText(MainActivity.this, "验证成功", Toast.LENGTH_SHORT).show();
            }
        });
    }
}
